API Documentation
Public Member Functions | List of all members
nkGraphics::ResourceManager Class Reference

Generic resource manager, enabling more intelligent processing of resources, compared to the ContentLoader. More...

Inheritance diagram for nkGraphics::ResourceManager:

Public Member Functions

void loadResourceSetDescFileSync (const ResourceSetLoadQuery &query, ResourceSetLoadResult &resultRef)
 
void loadResourceSetDescFileAsync (const ResourceSetLoadQuery &query, ResourceSaveLoadCallback *callback=nullptr)
 
void saveResourceSetDescFile (const ResourceSetSaveQuery &query)
 
void loadCamera (const std::string_view &path, ResourceSaveLoadCallback *callback=nullptr)
 
void loadBlendState (const std::string_view &path, ResourceSaveLoadCallback *callback=nullptr)
 
void loadDepthStencilState (const std::string_view &path, ResourceSaveLoadCallback *callback=nullptr)
 
void loadRasterState (const std::string_view &path, ResourceSaveLoadCallback *callback=nullptr)
 
void loadSampler (const std::string_view &path, ResourceSaveLoadCallback *callback=nullptr)
 
void loadTexture (const std::string_view &path, ResourceSaveLoadCallback *callback=nullptr)
 
void loadBuffer (const std::string_view &path, ResourceSaveLoadCallback *callback=nullptr)
 
void loadShader (const std::string_view &path, ResourceSaveLoadCallback *callback=nullptr)
 
void loadProgram (const std::string_view &path, ResourceSaveLoadCallback *callback=nullptr)
 
void loadMesh (const std::string_view &path, ResourceSaveLoadCallback *callback=nullptr)
 
void loadCompositor (const std::string_view &path, const std::string_view &compoToDefault="", ResourceSaveLoadCallback *callback=nullptr)
 
void loadNode (const std::string_view &path, ResourceSaveLoadCallback *callback=nullptr)
 

Detailed Description

Generic resource manager, enabling more intelligent processing of resources, compared to the ContentLoader.

Member Function Documentation

◆ loadResourceSetDescFileSync()

void nkGraphics::ResourceManager::loadResourceSetDescFileSync ( const ResourceSetLoadQuery query,
ResourceSetLoadResult resultRef 
)

Requests to load a resource set, synchronously.

Parameters
queryThe resource set load query.
resultRefThe result to populate.
Remarks
Currently WIP. This will change.

◆ loadResourceSetDescFileAsync()

void nkGraphics::ResourceManager::loadResourceSetDescFileAsync ( const ResourceSetLoadQuery query,
ResourceSaveLoadCallback callback = nullptr 
)

Requests to load a resource set, asynchronously.

Parameters
queryThe resource set load query.
callbackThe callback interface to use.
Remarks
Currently WIP. This might change and / or work in an unexpected way.

◆ saveResourceSetDescFile()

void nkGraphics::ResourceManager::saveResourceSetDescFile ( const ResourceSetSaveQuery query)

Requests to save a resource set, Synchronously.

Parameters
queryThe resource set save query.

◆ loadCamera()

void nkGraphics::ResourceManager::loadCamera ( const std::string_view &  path,
ResourceSaveLoadCallback callback = nullptr 
)

Loads a camera declaration file. Does it asynchronously.

Parameters
pathThe declaration path, relative to the working directory. See nkResources::ResourceManager for path naming conventions.
callbackThe callback used for resource loading.
Remarks
Currently WIP. This might change and / or work in an unexpected way.

◆ loadBlendState()

void nkGraphics::ResourceManager::loadBlendState ( const std::string_view &  path,
ResourceSaveLoadCallback callback = nullptr 
)

Loads a blend state declaration file. Does it asynchronously.

Parameters
pathThe declaration path, relative to the working directory. See nkResources::ResourceManager for path naming conventions.
callbackThe callback used for resource loading.
Remarks
Currently WIP. This might change and / or work in an unexpected way.

◆ loadDepthStencilState()

void nkGraphics::ResourceManager::loadDepthStencilState ( const std::string_view &  path,
ResourceSaveLoadCallback callback = nullptr 
)

Loads a depth and stencil state declaration file. Does it asynchronously.

Parameters
pathThe declaration path, relative to the working directory. See nkResources::ResourceManager for path naming conventions.
callbackThe callback used for resource loading.
Remarks
Currently WIP. This might change and / or work in an unexpected way.

◆ loadRasterState()

void nkGraphics::ResourceManager::loadRasterState ( const std::string_view &  path,
ResourceSaveLoadCallback callback = nullptr 
)

Loads a raster state declaration file. Does it asynchronously.

Parameters
pathThe declaration path, relative to the working directory. See nkResources::ResourceManager for path naming conventions.
callbackThe callback used for resource loading.
Remarks
Currently WIP. This might change and / or work in an unexpected way.

◆ loadSampler()

void nkGraphics::ResourceManager::loadSampler ( const std::string_view &  path,
ResourceSaveLoadCallback callback = nullptr 
)

Loads a sampler declaration file. Does it asynchronously.

Parameters
pathThe declaration path, relative to the working directory. See nkResources::ResourceManager for path naming conventions.
callbackThe callback used for resource loading.
Remarks
Currently WIP. This might change and / or work in an unexpected way.

◆ loadTexture()

void nkGraphics::ResourceManager::loadTexture ( const std::string_view &  path,
ResourceSaveLoadCallback callback = nullptr 
)

Loads a texture declaration file. Does it asynchronously.

Parameters
pathThe declaration path, relative to the working directory. See nkResources::ResourceManager for path naming conventions.
callbackThe callback used for resource loading.
Remarks
Currently WIP. This might change and / or work in an unexpected way.

◆ loadBuffer()

void nkGraphics::ResourceManager::loadBuffer ( const std::string_view &  path,
ResourceSaveLoadCallback callback = nullptr 
)

Loads a buffer declaration file. Does it asynchronously.

Parameters
pathThe declaration path, relative to the working directory. See nkResources::ResourceManager for path naming conventions.
callbackThe callback used for resource loading.
Remarks
Currently WIP. This might change and / or work in an unexpected way.

◆ loadShader()

void nkGraphics::ResourceManager::loadShader ( const std::string_view &  path,
ResourceSaveLoadCallback callback = nullptr 
)

Loads a sahder declaration file. Does it asynchronously.

Parameters
pathThe declaration path, relative to the working directory. See nkResources::ResourceManager for path naming conventions.
callbackThe callback used for resource loading.
Remarks
Currently WIP. This might change and / or work in an unexpected way.

◆ loadProgram()

void nkGraphics::ResourceManager::loadProgram ( const std::string_view &  path,
ResourceSaveLoadCallback callback = nullptr 
)

Loads a program declaration file. Does it asynchronously.

Parameters
pathThe declaration path, relative to the working directory. See nkResources::ResourceManager for path naming conventions.
callbackThe callback used for resource loading.
Remarks
Currently WIP. This might change and / or work in an unexpected way.

◆ loadMesh()

void nkGraphics::ResourceManager::loadMesh ( const std::string_view &  path,
ResourceSaveLoadCallback callback = nullptr 
)

Loads a mesh declaration file. Does it asynchronously.

Parameters
pathThe declaration path, relative to the working directory. See nkResources::ResourceManager for path naming conventions.
callbackThe callback used for resource loading.
Remarks
Currently WIP. This might change and / or work in an unexpected way.

◆ loadCompositor()

void nkGraphics::ResourceManager::loadCompositor ( const std::string_view &  path,
const std::string_view &  compoToDefault = "",
ResourceSaveLoadCallback callback = nullptr 
)

Loads a compositor declaration file. Does it asynchronously.

Parameters
pathThe declaration path, relative to the working directory. See nkResources::ResourceManager for path naming conventions.
compoToDefaultThe default name to set as a default.
callbackThe callback used for resource loading.
Remarks
Currently WIP. This might change and / or work in an unexpected way.

◆ loadNode()

void nkGraphics::ResourceManager::loadNode ( const std::string_view &  path,
ResourceSaveLoadCallback callback = nullptr 
)

Loads a node (scene) declaration file. Does it asynchronously.

Parameters
pathThe declaration path, relative to the working directory. See nkResources::ResourceManager for path naming conventions.
callbackThe callback used for resource loading.
Remarks
Currently WIP. This might change and / or work in an unexpected way.

The documentation for this class was generated from the following file: